package com.coolingme.web.dict;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 字典项转义
 *
 * @author wangyue
 * @date 2021/11/29 11:48
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotationsInside
@JsonSerialize(using = DictSerializer.class)
public @interface DictAnnotation {

    ElementType type();

    /**
     * 字典项类别
     */
    enum ElementType {
        SEX, MARITAL_STATE
    }

}
